# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Spectrum.V1explorer.Model.FrequencyRange do
  @moduledoc """
  A specific range of frequencies together with the associated maximum power level and channel identifier.

  ## Attributes

  - channelId (String.t): The database may include a channel identifier, when applicable. When it is included, the device should treat it as informative. The length of the identifier should not exceed 16 characters. Defaults to: `null`.
  - maxPowerDBm (float()): The maximum total power level (EIRP)—computed over the corresponding operating bandwidth—that is permitted within the frequency range. Depending on the context in which the frequency-range element appears, this value may be required. For example, it is required in the available-spectrum response, available-spectrum-batch response, and spectrum-use notification message, but it should not be present (it is not applicable) when the frequency range appears inside a device-capabilities message. Defaults to: `null`.
  - startHz (float()): The required inclusive start of the frequency range (in Hertz). Defaults to: `null`.
  - stopHz (float()): The required exclusive end of the frequency range (in Hertz). Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :channelId => any(),
          :maxPowerDBm => any(),
          :startHz => any(),
          :stopHz => any()
        }

  field(:channelId)
  field(:maxPowerDBm)
  field(:startHz)
  field(:stopHz)
end

defimpl Poison.Decoder, for: GoogleApi.Spectrum.V1explorer.Model.FrequencyRange do
  def decode(value, options) do
    GoogleApi.Spectrum.V1explorer.Model.FrequencyRange.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Spectrum.V1explorer.Model.FrequencyRange do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
